package com.ruoyi.buss.task.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.buss.task.mapper.DataTaskExRecordImageMapper;
import com.ruoyi.buss.task.domain.DataTaskExRecordImage;
import com.ruoyi.buss.task.service.IDataTaskExRecordImageService;

/**
 * 营销任务执行记录图片Service业务层处理
 * 
 * @author sxy
 * @date 2021-07-16
 */
@Service
public class DataTaskExRecordImageServiceImpl implements IDataTaskExRecordImageService 
{
    @Autowired
    private DataTaskExRecordImageMapper dataTaskExRecordImageMapper;

    /**
     * 查询营销任务执行记录图片
     * 
     * @param taskExRecordId 营销任务执行记录图片ID
     * @return 营销任务执行记录图片
     */
    @Override
    public DataTaskExRecordImage selectDataTaskExRecordImageById(String taskExRecordId)
    {
        return dataTaskExRecordImageMapper.selectDataTaskExRecordImageById(taskExRecordId);
    }

    /**
     * 查询营销任务执行记录图片列表
     * 
     * @param dataTaskExRecordImage 营销任务执行记录图片
     * @return 营销任务执行记录图片
     */
    @Override
    public List<DataTaskExRecordImage> selectDataTaskExRecordImageList(DataTaskExRecordImage dataTaskExRecordImage)
    {
        return dataTaskExRecordImageMapper.selectDataTaskExRecordImageList(dataTaskExRecordImage);
    }

    /**
     * 新增营销任务执行记录图片
     * 
     * @param dataTaskExRecordImage 营销任务执行记录图片
     * @return 结果
     */
    @Override
    public int insertDataTaskExRecordImage(DataTaskExRecordImage dataTaskExRecordImage)
    {
        dataTaskExRecordImage.setCreateTime(DateUtils.getNowDate());
        return dataTaskExRecordImageMapper.insertDataTaskExRecordImage(dataTaskExRecordImage);
    }

    /**
     * 修改营销任务执行记录图片
     * 
     * @param dataTaskExRecordImage 营销任务执行记录图片
     * @return 结果
     */
    @Override
    public int updateDataTaskExRecordImage(DataTaskExRecordImage dataTaskExRecordImage)
    {
        dataTaskExRecordImage.setUpdateTime(DateUtils.getNowDate());
        return dataTaskExRecordImageMapper.updateDataTaskExRecordImage(dataTaskExRecordImage);
    }

    /**
     * 批量删除营销任务执行记录图片
     * 
     * @param taskExRecordIds 需要删除的营销任务执行记录图片ID
     * @return 结果
     */
    @Override
    public int deleteDataTaskExRecordImageByIds(String[] taskExRecordIds)
    {
        return dataTaskExRecordImageMapper.deleteDataTaskExRecordImageByIds(taskExRecordIds);
    }

    /**
     * 删除营销任务执行记录图片信息
     * 
     * @param taskExRecordId 营销任务执行记录图片ID
     * @return 结果
     */
    @Override
    public int deleteDataTaskExRecordImageById(String taskExRecordId)
    {
        return dataTaskExRecordImageMapper.deleteDataTaskExRecordImageById(taskExRecordId);
    }
}
